\hypertarget{aes_8h}{\section{E\+:/\+Other/\+Gitee/components-\/examples/\+A01-\/\+A\+E\+S/exam/aes/aes.h 文件参考}
\label{aes_8h}\index{E\+:/\+Other/\+Gitee/components-\/examples/\+A01-\/\+A\+E\+S/exam/aes/aes.\+h@{E\+:/\+Other/\+Gitee/components-\/examples/\+A01-\/\+A\+E\+S/exam/aes/aes.\+h}}
}
{\ttfamily \#include $<$stdint.\+h$>$}\\*
{\ttfamily \#include $<$stdlib.\+h$>$}\\*
\subsection*{宏定义}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{aes_8h_a22342c953c4b0072cb2e0a8a4e686253}{gmult}(a, b)~\hyperlink{gmult_8h_a985dad9241346475b94788f4ec6ae5d3}{gmult\+\_\+aes}\mbox{[}256$\ast$a + b\mbox{]}
\end{DoxyCompactItemize}
\subsection*{函数}
\begin{DoxyCompactItemize}
\item 
uint8\+\_\+t $\ast$ \hyperlink{aes_8h_a5682ceb1811499fe30fbe705877ff32c}{aes\+\_\+init} (size\+\_\+t key\+\_\+size)
\begin{DoxyCompactList}\small\item\em Initialize A\+E\+S variables and allocate memory for expanded key. \end{DoxyCompactList}\item 
void \hyperlink{aes_8h_a461739b060263bfe2888f4a47d8f5186}{aes\+\_\+key\+\_\+expansion} (uint8\+\_\+t $\ast$key, uint8\+\_\+t $\ast$w)
\begin{DoxyCompactList}\small\item\em Key Expansion. \end{DoxyCompactList}\item 
void \hyperlink{aes_8h_a73d0f24db5e8c95eaf2b6c1979188b50}{aes\+\_\+inv\+\_\+cipher} (uint8\+\_\+t $\ast$in, uint8\+\_\+t $\ast$out, uint8\+\_\+t $\ast$w)
\begin{DoxyCompactList}\small\item\em Performs the A\+E\+S inverse cipher operation. \end{DoxyCompactList}\item 
void \hyperlink{aes_8h_a5d8ac3ac83810baa35fa15c5e4b25303}{aes\+\_\+cipher} (uint8\+\_\+t $\ast$in, uint8\+\_\+t $\ast$out, uint8\+\_\+t $\ast$w)
\begin{DoxyCompactList}\small\item\em Performs the A\+E\+S cipher operation. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{宏定义说明}
\hypertarget{aes_8h_a22342c953c4b0072cb2e0a8a4e686253}{\index{aes.\+h@{aes.\+h}!gmult@{gmult}}
\index{gmult@{gmult}!aes.\+h@{aes.\+h}}
\subsubsection[{gmult}]{\setlength{\rightskip}{0pt plus 5cm}\#define gmult(
\begin{DoxyParamCaption}
\item[{}]{a, }
\item[{}]{b}
\end{DoxyParamCaption}
)~{\bf gmult\+\_\+aes}\mbox{[}256$\ast$a + b\mbox{]}}}\label{aes_8h_a22342c953c4b0072cb2e0a8a4e686253}


\subsection{函数说明}
\hypertarget{aes_8h_a5d8ac3ac83810baa35fa15c5e4b25303}{\index{aes.\+h@{aes.\+h}!aes\+\_\+cipher@{aes\+\_\+cipher}}
\index{aes\+\_\+cipher@{aes\+\_\+cipher}!aes.\+h@{aes.\+h}}
\subsubsection[{aes\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}void aes\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{in, }
\item[{uint8\+\_\+t $\ast$}]{out, }
\item[{uint8\+\_\+t $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{aes_8h_a5d8ac3ac83810baa35fa15c5e4b25303}


Performs the A\+E\+S cipher operation. 


\begin{DoxyParams}{参数}
{\em $\ast$in} & 明文 \\
\hline
{\em $\ast$out} & 加密后的密文 \\
\hline
{\em $\ast$w} & 扩展后的密钥 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8h_a5682ceb1811499fe30fbe705877ff32c}{\index{aes.\+h@{aes.\+h}!aes\+\_\+init@{aes\+\_\+init}}
\index{aes\+\_\+init@{aes\+\_\+init}!aes.\+h@{aes.\+h}}
\subsubsection[{aes\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t$\ast$ aes\+\_\+init (
\begin{DoxyParamCaption}
\item[{size\+\_\+t}]{key\+\_\+size}
\end{DoxyParamCaption}
)}}\label{aes_8h_a5682ceb1811499fe30fbe705877ff32c}


Initialize A\+E\+S variables and allocate memory for expanded key. 


\begin{DoxyParams}{参数}
{\em key\+\_\+size} & 密钥的字节数 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8h_a73d0f24db5e8c95eaf2b6c1979188b50}{\index{aes.\+h@{aes.\+h}!aes\+\_\+inv\+\_\+cipher@{aes\+\_\+inv\+\_\+cipher}}
\index{aes\+\_\+inv\+\_\+cipher@{aes\+\_\+inv\+\_\+cipher}!aes.\+h@{aes.\+h}}
\subsubsection[{aes\+\_\+inv\+\_\+cipher}]{\setlength{\rightskip}{0pt plus 5cm}void aes\+\_\+inv\+\_\+cipher (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{in, }
\item[{uint8\+\_\+t $\ast$}]{out, }
\item[{uint8\+\_\+t $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{aes_8h_a73d0f24db5e8c95eaf2b6c1979188b50}


Performs the A\+E\+S inverse cipher operation. 


\begin{DoxyParams}{参数}
{\em $\ast$in} & 密文 \\
\hline
{\em $\ast$out} & 密文的逆 \\
\hline
{\em $\ast$w} & 扩展后的密钥 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
\hypertarget{aes_8h_a461739b060263bfe2888f4a47d8f5186}{\index{aes.\+h@{aes.\+h}!aes\+\_\+key\+\_\+expansion@{aes\+\_\+key\+\_\+expansion}}
\index{aes\+\_\+key\+\_\+expansion@{aes\+\_\+key\+\_\+expansion}!aes.\+h@{aes.\+h}}
\subsubsection[{aes\+\_\+key\+\_\+expansion}]{\setlength{\rightskip}{0pt plus 5cm}void aes\+\_\+key\+\_\+expansion (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{key, }
\item[{uint8\+\_\+t $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{aes_8h_a461739b060263bfe2888f4a47d8f5186}


Key Expansion. 


\begin{DoxyParams}{参数}
{\em $\ast$key} & 密钥 \\
\hline
{\em $\ast$w} & 密钥编排结果 \\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{返回值}
{\em } & \\
\hline
\end{DoxyRetVals}
